<%@ taglib uri="http://java.sun.com/jsp/jstl/core" prefix="c" %>
<%@ taglib prefix="spring" uri="http://www.springframework.org/tags" %>
<%@ taglib prefix="form" uri="http://www.springframework.org/tags/form" %>
<%@ taglib prefix="sec" uri="http://www.springframework.org/security/tags" %>

<?xml version="1.0" encoding="ISO-8859-15"?>
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.1//EN" "http://www.w3.org/TR/xhtml11/DTD/xhtml11.dtd">
<html xmlns="http://www.w3.org/1999/xhtml" xml:lang="fr">

<head>
<meta http-equiv="Content-Type" content="text/html; charset=ISO-8859-1">
<link rel="stylesheet" href="style.css" />
<title>Liste des employes</title>
</head>
<body>

	<form:form commandName="employes" method="post" action="employes.html">
	
		<fieldset>
			<legend>Liste des employes</legend>
			<table>
				<tr>
					<th>Nom</th>
					<th>Pr&eacute;nom</th>
					<th>Age</th>
					<th>Photo</th>
					<th>Suppr.</th>
				</tr>
				
				<c:forEach var="emp" items="${lstEmploye}" >
				<tr>
					<td><a href="employe.html?id=${emp.id}"><c:out value="${emp.nom}"></c:out></a></td>
					<td><a href="employe.html?id=${emp.id}"><c:out value="${emp.prenom}"></c:out></a></td>
					<td><c:out value="${emp.age}"></c:out></td>
					<td><img src="photo.html?id=${emp.id}" /></td>
					<td><input type="checkbox" name="asupprimer" value="${emp.id}" /></td>
				</tr>
				</c:forEach>
				
			</table>
			
			<input type="submit" name="validation" value="Ajouter" />
			<input type="submit" name="validation" value="Supprimer" />
			
		</fieldset>
	</form:form>
	
	<sec:authorize access="hasRole('ROLE_ADMIN')">
	<p>
		<a href="../administration.html">Gestion des utilisateurs</a>
	</p>
	</sec:authorize>


</body>
</html>